ASP.NET Core 2 Fundamentals by Onur Gumus

ASP.NET Core 2 Fundamentals by Onur Gumus

Author:Onur Gumus
Language: eng
Format: epub
Tags: COM051470 - COMPUTERS / Programming Languages / ASP .NET, COM018000 - COMPUTERS / Data Processing
Publisher: Packt Publishing
Published: 2018-08-30T06:56:22+00:00


Entity Framework

If we are using a relational database, there is an impedance mismatch with the data and our domain classes, since the data is relational whereas our domain is composed of objects. The aim of using ORM is to eliminate (or hide) this mismatch so that we can totally ignore the persistence problems and instead focus on our code rather than trying to generate pesky SQL statements. Having said that, there are many valid cases to drop back to SQL statements, such as performance tuning cases or complex reports.

Entity Framework (EF) is the Object Relational Mapping (ORM) framework that enables developers to work on domain-specific objects directly for data access instead of working on database queries. This reduces a lot of the code complexity in the data access layer of the application.

Before discussing Entity Framework and its features, let us pause for a moment and think about the steps that we follow when we try to save some information to the database while using ADO.NET:

Construct the business domain object.

Create a connection to your database.

Open the connection.

Create a command object along with the command type.

Add the properties of your business domain object to the parameters of the command object.

Execute the command that saves the data into the database.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.